    <div class="headingBox">
        <div class="FloatLeft"><img alt="" src="<?php echo imageUrl(); ?>red_leftRound.jpg" height="24" width="5"></div>
        <div style="width:992px;" class="red_midRound"><?php echo $page_heading; ?></div>
        <div class="FloatLeft"><img alt="" src="<?php echo imageUrl(); ?>red_rightRound.jpg" height="24" width="5"></div>
    </div>
        <div>
        <?php 
			$id = (isset($id) && $id != '' ) ? intval($id) : '';
		?>
        <form method="post" action="<?php echo base_url().$this->uri->segment(1); ?>/save<?php echo ($id != '' ) ? "/$id" : ''; ?>">
            <input name="sbmt" id="sbmt" value="1" type="hidden">
            <table class="subContentTable" cellpadding="2" cellspacing="5" width="100%">
                <tbody>
                <tr>
    <td width="20%"><strong>Skill:<span class="required">*</span></strong></td>
                    <td width="35%">
                         <?php  
 							$skill_id = set_value('skill_id', isset($skill_id) ? $skill_id : '' );
							echo create_select("skill_id", getAllskills(), $skill_id, array('value'=>'id', 'label'=>'name') );
							echo form_error('skill_id', '<div class="errorMsg_1" style="">', '</div>');
						 ?>
                    </td>
                    <td width="20%"></td>
                    <td width="35%">
                       
                    </td>
                </tr>
                
                
                 <tr>
                    <td width="20%"><strong>OFF Start Time<span class="required">*</span>:</strong></td>
                    <td width="35%">
                        <input name="off_start_time"  class="class_timepicker" id="off_start_time" value="<?php echo set_value('off_start_time', isset($off_start_time) ? $off_start_time : '' ); ?>" size="30" type="text">
                        <br><label class="lb_hint"> format(hh:mm) i.e. 23:59 </label>
						<?php echo form_error('off_start_time', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    <td width="20%"><strong>OFF End Time <span class="required">*</span>:</strong></td>
                    <td width="35%">
                        <input name="off_end_time"  class="class_timepicker" value="<?php echo set_value('off_end_time', isset($off_end_time) ? $off_end_time : '' ); ?>" size="30" type="text">
                        <br><label class="lb_hint"> format(hh:mm) i.e. 23:59 </label>
						<?php echo form_error('off_end_time', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                </tr>
                 <tr>
                   <td width="20%"><strong>Time Zone<span class="required">*</span>:</strong> </td>
                    <td width="35%">
                     <?php  
 							$timezone = set_value('timezone', isset($timezone) ? $timezone : '' );
							echo create_select("timezone", getAllTimeZones(), $timezone, array('value'=>'offset', 'label'=>'name'), 'style="width:250px"' );
							echo form_error('timezone', '<div class="errorMsg_1" style="">', '</div>');
						 ?>
                    </td>
                    <td width="20%"></td>
                    <td width="35%">
                    </td>
                </tr>
                
                <tr>
                    <td width="20%"><strong>Play File<span class="required">*</span>:</strong></td>
                 	<td>
                   <input name="play_file" value="<?php echo set_value('play_file', isset($play_file) ? $play_file : '' ); ?>" size="30" type="text">
                          <br><label class="lb_hint"> File name without extension </label>
                        <?php echo form_error('play_file', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>  
                   <td width="20%"><strong>Extension<span class="required">*</span>:</strong></td>
                    <td width="35%">
                        <input name="ext" value="<?php echo set_value('ext', isset($ext) ? $ext : '' ); ?>" size="30" type="text">
                        <?php echo form_error('ext', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                </tr>
                
             
                
                 <tr>
                 	<td width="20%"><strong>Select Off Hours Days:<span class="required">*</span></strong></td>
                 	<td colspan="3" >
                    	 <?php 	foreach( $this->days_arr as $day => $dayFullName )
								{ 
									if( $this->input->post('sbmt') == 1 ) 	{ 
										$checked = $this->input->post($day)  ? "checked='checked'" : '';
									} else 	{
										$checked = ( isset($$day) && $$day == "Y" ) ? "checked='checked'" : '';	
									}
									
								?>
								 		
									<li style="list-style-type:none; text-align:center; padding:2px; font-weight:bold; margin:1px 1px; float:left; border:1px solid #CCC;">
                                    <label><input <?php echo $checked; ?> type="checkbox" name="<?php echo $day ?>"  /> <span style="vertical-align:2px;"><?php echo $dayFullName; ?></span></label>
                                    </li>
                                        
						<?php	} ?>
						<div style="clear:both;"></div>
						<?php if( count($error_arr) > 0 ) 
							{
                        		foreach( $error_arr as $err) {
                        	    echo '<div class="errorMsg_1" style="" align="left">'.$err.'</div>';	
                        		}
                   			 }
                    //vardump($error_arr); 

							
							?>

                    </td>
                </tr>
             
                <tr bgcolor="#fff1d5">
                    <td colspan="4" align="left">
                        <input value="" class="backBtn" onclick="location.href='<?php echo base_url().$this->uri->segment(1); ?>';" type="button">
                        <input value="" class="submitBtn" type="submit">
                    </td>
                </tr>
            </tbody></table>
        </form> 
    </div>
 <script>
	$('#agents').multiSelect({
			selectableHeader : '<h4>Available Agents</h4>',
			selectionHeader : '<h4>Assigned Agents</h4>'
		});
		
</script>
  